<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="代码编辑器," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="Sublime Text：一款具有代码高亮、语法提示、自动完成且反应快速的编辑器软件，不仅具有华丽的界面，还支持插件扩展机制，用她来写代码，绝对是一种享受。相比于难于上手的Vim，浮肿沉重的Eclipse，VS，即便体积轻巧迅速启动的Editplus、Notepad++，在SublimeText面前大略显失色，无疑这款性感无比的编辑器是Coding和Writing最佳的选择，没有之一。 虽然近几年">
<meta name="keywords" content="代码编辑器">
<meta property="og:type" content="article">
<meta property="og:title" content="sublime编辑器的使用（一）插件安装">
<meta property="og:url" content="http://lanbos.win/2015/01/10/tools/sublime_base01/index.html">
<meta property="og:site_name" content="lanbos&#39;blog">
<meta property="og:description" content="Sublime Text：一款具有代码高亮、语法提示、自动完成且反应快速的编辑器软件，不仅具有华丽的界面，还支持插件扩展机制，用她来写代码，绝对是一种享受。相比于难于上手的Vim，浮肿沉重的Eclipse，VS，即便体积轻巧迅速启动的Editplus、Notepad++，在SublimeText面前大略显失色，无疑这款性感无比的编辑器是Coding和Writing最佳的选择，没有之一。 虽然近几年">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2016-12-30T10:03:20.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="sublime编辑器的使用（一）插件安装">
<meta name="twitter:description" content="Sublime Text：一款具有代码高亮、语法提示、自动完成且反应快速的编辑器软件，不仅具有华丽的界面，还支持插件扩展机制，用她来写代码，绝对是一种享受。相比于难于上手的Vim，浮肿沉重的Eclipse，VS，即便体积轻巧迅速启动的Editplus、Notepad++，在SublimeText面前大略显失色，无疑这款性感无比的编辑器是Coding和Writing最佳的选择，没有之一。 虽然近几年">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://lanbos.win/2015/01/10/tools/sublime_base01/"/>





  <title> sublime编辑器的使用（一）插件安装 | lanbos'blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">lanbos'blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">这个人假装很懒，什么都没有留下</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://lanbos.win/2015/01/10/tools/sublime_base01/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="lanbos">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="https://ws1.sinaimg.cn/large/5c9d16d6gw1fbesf3zrhej209p09ftai.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="lanbos'blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="lanbos'blog" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                sublime编辑器的使用（一）插件安装
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2015-01-10T08:55:29+08:00">
                2015-01-10
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/常用工具/" itemprop="url" rel="index">
                    <span itemprop="name">常用工具</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Sublime Text：一款具有代码高亮、语法提示、自动完成且反应快速的编辑器软件，不仅具有华丽的界面，还支持插件扩展机制，用她来写代码，绝对是一种享受。相比于难于上手的Vim，浮肿沉重的Eclipse，VS，即便体积轻巧迅速启动的Editplus、Notepad++，在SublimeText面前大略显失色，无疑这款性感无比的编辑器是Coding和Writing最佳的选择，没有之一。</p>
<p>虽然近几年visual sudio code和atom编辑器的崛起分流了部分sublime的使用者，但是sublime急速打开速度，和流畅的操作体验还是前二者无法比拟的。</p>
<h2 id="sublime插件安装"><a href="#sublime插件安装" class="headerlink" title="sublime插件安装"></a>sublime插件安装</h2><blockquote>
<p>按Ctrl+`调出console（注：安装有QQ输入法的这个快捷键会有冲突的，输入法属性设置-输入法管理-取消热键切换至QQ拼音）粘贴以下代码到底部命令行并回车：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">import urllib.request,os; pf = &apos;Package Control.sublime-package&apos;; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), &apos;wb&apos;).write(urllib.request.urlopen( &apos;http://sublime.wbond.net/&apos; + pf.replace(&apos; &apos;,&apos;%20&apos;)).read())</div></pre></td></tr></table></figure></p>
</blockquote>
<p>重启Sublime Text 3。如果在Perferences-&gt;package settings中看到package control这一项，则安装成功。按下Ctrl+Shift+P调出命令面板输入install 调出 Install Package 选项并回车，然后在列表中选中要安装的插件。<br><a id="more"></a></p>
<h2 id="sublime插件推荐"><a href="#sublime插件推荐" class="headerlink" title="sublime插件推荐"></a>sublime插件推荐</h2><h3 id="1-emmet"><a href="#1-emmet" class="headerlink" title="1.emmet"></a>1.emmet</h3><blockquote>
<p>快速生成HTML代码段的插件，强大到无与伦比:可以超快速编写HTML/CSS/JS。</p>
</blockquote>
<p>可以说是前端工程师、美工必备的插件了，可以说没有emmet的sublime是不完备的。emmet极大的简化了html语法，在vscode和webstorm等ide中都默认集成了，关于emmet的语法有时间我会抽空另开一篇博客详细描述，这里只需要记住强大的<em>tab</em>键即可。</p>
<h3 id="2-Autoprefixer"><a href="#2-Autoprefixer" class="headerlink" title="2.Autoprefixer"></a>2.Autoprefixer</h3><blockquote>
<p>这是一款CSS3私有前缀自动补全插件；该插件使用CanIUse资料库（当然，SublimeText自然也有CanIUse这个插件咯），能精准判断哪些属性需要什么前缀，与CssComb插件一样，该插件也需要系统已安装Node.js环境；使用方法：在输入CSS3属性后（冒号前）按Tab键即可。</p>
</blockquote>
<p>当前大部分私有前缀补全的工作都由代码部署工具来完成了，编辑器中的相关插件只是后备选择。</p>
<h3 id="3-HTML-CSS-JS-Prettify"><a href="#3-HTML-CSS-JS-Prettify" class="headerlink" title="3.HTML-CSS-JS Prettify"></a>3.HTML-CSS-JS Prettify</h3><blockquote>
<p>一款集成了格式化（美化）html、css、js三种文件类型的插件，即便html,js写在PHP文件之内。插件依赖于nodejs，因此需要事先安装nodejs，然后才可以正常运行。插件安装完成后，快捷键ctrl+shift+H完成当前文件的美化操作。详情请参照<a href="http://frontenddev.org/article/sublime-does-text-three-plug-ins-html-and-css-js-prettify.html" target="_blank" rel="external"> sublime text 3 插件：HTML-CSS-JS Prettify</a></p>
</blockquote>
<h3 id="4-SFTP"><a href="#4-SFTP" class="headerlink" title="4.SFTP"></a>4.SFTP</h3><p>顾名思义，方便编辑完成后直接ftp上传到服务器的插件。需要简单的配置一下，具体看：<a href="http://blog.wpjam.com/m/sublime-text-2-sftp/" target="_blank" rel="external">在 Sublime Text 2 中使用 SFTP 插件快速编辑远程服务器文件</a></p>
<h3 id="5-All-autocomplete"><a href="#5-All-autocomplete" class="headerlink" title="5.All autocomplete"></a>5.All autocomplete</h3><p>Sublime Text 默认的 Autocomplete 功能只考虑当前的文件，而 AllAutocomplete 插件会搜索所有打开的文件来寻找匹配的提示词。</p>
<h3 id="6-git和GitGutter"><a href="#6-git和GitGutter" class="headerlink" title="6.git和GitGutter"></a>6.git和GitGutter</h3><p>方便在sublime中操作git，GitGutter能更好的帮助开发者查看文件之前的改动和差异</p>
<h3 id="7-svn"><a href="#7-svn" class="headerlink" title="7.svn"></a>7.svn</h3><p>工作中避免不了使用svn。。。</p>
<h3 id="8-Auto-filename"><a href="#8-Auto-filename" class="headerlink" title="8.Auto filename"></a>8.Auto filename</h3><p>自动补全引用文件的路径。</p>
<h3 id="9-SideBarEnhancements"><a href="#9-SideBarEnhancements" class="headerlink" title="9.SideBarEnhancements"></a>9.SideBarEnhancements</h3><p>SideBarEnhancements是一款很实用的右键菜单增强插件；在安装该插件前，在Sublime Text左侧FOLDERS栏中点击右键，只有寥寥几个简单的功能；安装了就相当于给其丰了大胸一般。</p>
<h3 id="10-各种框架、类库、语言相关插件"><a href="#10-各种框架、类库、语言相关插件" class="headerlink" title="10.各种框架、类库、语言相关插件"></a>10.各种框架、类库、语言相关插件</h3><p>sublime 的较为友好的插件机制让很多开发者都贡献了很多优质插件，只需要在<code>comman+shift+p</code>输入<code>install package</code>,然后在打开的窗口中搜索相关类库框架的名称就可以：如搜索<code>jquery</code>,可以找到jquery相关的插件。</p>
<h2 id="插件安装问题"><a href="#插件安装问题" class="headerlink" title="插件安装问题"></a>插件安装问题</h2><blockquote>
<p>解决sublime package control 出现 There are no packages available for installation。</p>
</blockquote>
<p>是因为<code>http://packagecontrol.io/channel_v3.json</code> 获取失败，这个文件是package的列表，找台能翻墙的电脑，把channel_v3.json文件复制下来。放在本地的服务器上，然后进入package control的settings中把里面的<code>http://packagecontrol.io/channel_v3.json</code>替换成<code>http://127.0.0.1:8080/Documents/channel_v3.json</code><br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">&quot;channels&quot;: [</div><div class="line">        &quot;http://127.0.0.1:8080/Documents/channel_v3.json&quot;</div><div class="line">    ]</div></pre></td></tr></table></figure></p>
<p>保存退出，开启本地服务器，然后就能安装插件了。</p>
<h2 id="引用："><a href="#引用：" class="headerlink" title="引用："></a>引用：</h2><p><a href="http://www.jeffjade.com/2015/12/15/2015-04-17-toss-sublime-text/" target="_blank" rel="external">如何优雅地使用Sublime Text</a></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/代码编辑器/" rel="tag"># 代码编辑器</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2014/11/07/hexo/hexo_newBegining/" rel="next" title="hexo搭建">
                <i class="fa fa-chevron-left"></i> hexo搭建
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2015/01/11/tools/sublime_base02/" rel="prev" title="sublime编辑器的使用（二）小技巧">
                sublime编辑器的使用（二）小技巧 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>
  <!-- UY BEGIN -->
<div id="uyan_frame"></div>
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=2123221"></script>
<!-- UY END -->



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="https://ws1.sinaimg.cn/large/5c9d16d6gw1fbesf3zrhej209p09ftai.jpg"
               alt="lanbos" />
          <p class="site-author-name" itemprop="name">lanbos</p>
          <p class="site-description motion-element" itemprop="description">这个人假装很懒，什么都没有留下</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">24</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">分类</span>
              
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">16</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#sublime插件安装"><span class="nav-number">1.</span> <span class="nav-text">sublime插件安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#sublime插件推荐"><span class="nav-number">2.</span> <span class="nav-text">sublime插件推荐</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-emmet"><span class="nav-number">2.1.</span> <span class="nav-text">1.emmet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-Autoprefixer"><span class="nav-number">2.2.</span> <span class="nav-text">2.Autoprefixer</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-HTML-CSS-JS-Prettify"><span class="nav-number">2.3.</span> <span class="nav-text">3.HTML-CSS-JS Prettify</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-SFTP"><span class="nav-number">2.4.</span> <span class="nav-text">4.SFTP</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-All-autocomplete"><span class="nav-number">2.5.</span> <span class="nav-text">5.All autocomplete</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-git和GitGutter"><span class="nav-number">2.6.</span> <span class="nav-text">6.git和GitGutter</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7-svn"><span class="nav-number">2.7.</span> <span class="nav-text">7.svn</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#8-Auto-filename"><span class="nav-number">2.8.</span> <span class="nav-text">8.Auto filename</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#9-SideBarEnhancements"><span class="nav-number">2.9.</span> <span class="nav-text">9.SideBarEnhancements</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#10-各种框架、类库、语言相关插件"><span class="nav-number">2.10.</span> <span class="nav-text">10.各种框架、类库、语言相关插件</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#插件安装问题"><span class="nav-number">3.</span> <span class="nav-text">插件安装问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#引用："><span class="nav-number">4.</span> <span class="nav-text">引用：</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">lanbos</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	




  
  

  

  

  

  


</body>
</html>
